from selenium import webdriver
from time import sleep

driver = webdriver.Firefox()
driver.get('https://www.baidu.com/')
sleep(2)
driver.maximize_window()
sleep(2)
driver.minimize_window()
sleep(2)
driver.quit()